home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbclon21.zip / LIBRARY.TXT < prev    next >
Text File  |  1992-03-23  |  3KB  |  79 lines

  1. So you've never used a library before and you want to know what
  2. gives?
  3.  
  4. A library is a collection of routines, whether written in
  5. BASIC, assembly language, or some other language altogether.
  6. It provides a convenient way to allow different programs to use
  7. the same sets of standard or special-purpose routines
  8. (subprograms or functions, in BASIC parlance).
  9.  
  10. There are two forms of libraries for QuickBASIC.  The form with
  11. the extension ".LIB" is for use with LINK, for creating
  12. stand-alone programs which do not require the QuickBASIC
  13. environment.  This sort of library can be made or manipulated
  14. using the LIB utility provided with QuickBASIC.  The form of
  15. library with the extension ".QLB" is for use in the QuickBASIC
  16. environment. It is created with LINK and (unfortunately) can't
  17. be manipulated at all.
  18.  
  19. To use a QLB library, you specify the /L parameter when
  20. starting up QB:
  21.  
  22.    QB /L PBCLONE
  23.  
  24. You can optionally include the name of your program before the
  25. /L switch.
  26.  
  27. To use a LIB library, you specify the name of the library when
  28. you LINK your program.  Either let LINK prompt you for the
  29. library or type something like this:
  30.  
  31.    BC program/O;                       (or whatever)
  32.    LINK program/EX,,NUL,PBCLONE
  33.  
  34. If you are in the QuickBASIC environment and direct the
  35. compiler to produce an .EXE file, it will automatically link
  36. the library for you if you started up QB with the /L option.
  37.  
  38. Suppose you have more than one library that you wish to use?
  39. Well, provided that you have both of the libraries in .LIB
  40. form, this presents no problem. To create a combined .LIB
  41. library, use the LIB utility to extract all of the .OBJ files
  42. from one .LIB and add them to the other one.  You can convert
  43. the new combined library to .QLB form by using a special LINK
  44. syntax:
  45.  
  46.    LINK combined.LIB/Q/SE:1024,,NUL,BQLB45;
  47.  
  48. The last two digits of "BQLBxx" represent the version of the
  49. compiler that you have.  It doesn't necessarily match the
  50. formal version number, though, so you might just want to use
  51. DIR and see what the name of the file really is. BQLBxx.LIB is
  52. one of the files that comes with QuickBASIC.  If you have QBX,
  53. use QBXQLB instead of BQLBxx.
  54.  
  55. The "/SE:1024" part is only needed when dealing with large
  56. libraries, such as PBClone.  It tells LINK to allocate more
  57. space for its internal tables.  This doesn't affect the size of
  58. the resulting library, though, so it never hurts to use this
  59. parameter.
  60.  
  61. If you experience a LINK error, make sure that you're using the
  62. current version of LINK.  I've heard from many people who turn
  63. out to have the wrong version of LINK in their PATH
  64. somewhere... when LINK starts up, it will display its version
  65. number on the screen.  The version should be around 3.69 as of
  66. QuickBASIC 4.5, or 5.05 for QBX.  You must use the LINK that
  67. came with QuickBASIC-- the one that comes with Quick C is
  68. incompatible and the one that came with BASCOM 6.0 (the one
  69. with two periods in the version number) has a few bugs.
  70.  
  71. If you are using BASCOM 7.0, DO NOT interrupt LINK with a Break
  72. or Control-C, as this may cause it to damage your hard disk!!!
  73. This bug is known to appear in the LINK that comes with BASCOM
  74. 7.0.  I'm not sure whether they fixed it in BASCOM 7.1.  You
  75. may be more familiar with BASCOM 7.x as "PDS" or "The
  76. Professional Development System" (Marketing, ugh).
  77.  
  78. All clear?  No?!  Check your BASIC manuals for more information!
  79.